package homework;

public class Palindrome {
	int temp;
	int numberArray[]={121,256,676,5335,101,253,676,868,999,876};
    boolean retVal;

	int reversenumber;
	int remainder;
	
	public boolean isPalindrome(int number)
	{
		int reversenumber=0;

		temp=number;
		while(number!=0)
		{
	
			remainder=number%10;
			number=number/10;
			reversenumber=(reversenumber*10)+remainder;
		}
	
	return (reversenumber == temp);
	}
	
	
    
	public void printpalindrome()
	{

	for (int i=0; i<numberArray.length; i++)
	{
		retVal = isPalindrome(numberArray[i]);
	
		if(retVal)
			System.out.println(numberArray[i] +" Number is a palindrome ");
		else
			System.out.println(numberArray[i] + " Number is not a palindrome" );	
	}
	}
	
}


